<!--
 * @De/>: 2019-09-24 15:04:24
 * @LastEdi
tTime: 2019-09-24 15:04:24
 * @LastEditors: Please set LastEditors
 -->
<template>
  <div class="container">
    <div class="container_card">
      <div class="container_head">
        <svg-icon icon-class="list" />  渠道列表
      </div>
      <div class="container_body">
        <div class="btn_add"><el-button type="primary" @click="add_channel">添加渠道</el-button></div>
        <template>
          <el-table
            :data="tableData"
            border
          >
            <el-table-column
              prop="date"
              label="渠道名称"
            />
            <el-table-column
              prop="name"
              label="渠道代码"
            />
            <el-table-column
              label="操作"
            >
              <template slot-scope="scope">
                <!-- <el-button type="text" size="small" @click="viewChannel(scope.row)">查看</el-button> -->
                <el-button type="text" size="small" @click="href_add(scope.row.id)">编辑</el-button>
                <el-button type="text" size="small" @click="view_params(scope.row.id)">查看参数</el-button>
                <el-button type="text" size="small" @click="openParams(scope.row.id)">设置参数</el-button>
              </template>
            </el-table-column>
          </el-table>
        </template>

      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: []
    }
  },
  mounted() {
    this.$api.get_params_list([]).then(res => {
      console.log(res)
    })
  },
  methods: {
    add_channel() {
      this.$router.push({
        path: '/channel-params-add'
      })
    }
  }
}
</script>
<style scoped>
  .btn_add{
    margin-bottom: 40px;
  }
  .value{
    display: flex;
    /* justify-content: space-between */
  }
</style>
